#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys
import traceback

class ErrorHelper(object):
    '''
    Helper class for error handling
    '''

    @staticmethod
    def format_exception():
        '''
        return the string with full stack for last exception
        '''
        exc_type, exc_value, exc_traceback = sys.exc_info()
        lines = traceback.format_exception(exc_type, exc_value, exc_traceback)
        return ''.join(line for line in lines)